import App from './App'

import * as api from './util/api.js'
// import { cache } from './util/cache.js'
import * as cache from './util/cache.js'

import { baseUrl } from './util/api.js'
import { myGetFunction } from './util/api.js'

import { isArrayFn } from './util/api.js'
import { getMyUrlParams } from './util/api.js'
import { myRequest } from './util/api.js'
import { get_v_by_kname } from './util/api.js'
import { get_keyname_value } from './util/api.js'
import { add_hostname_before_keyname } from './util/api.js'
import dropdown from './components/dt-dropdown/dt-dropdown.vue'


Vue.component('dropdown', dropdown)

Vue.prototype.api = api
Vue.prototype.cache = cache

Vue.prototype.$baseUrl = baseUrl
Vue.prototype.$isArrayFn = isArrayFn
Vue.prototype.$myGetFunction = myGetFunction
Vue.prototype.$getMyUrlParams = getMyUrlParams
Vue.prototype.$myRequest = myRequest
Vue.prototype.$get_v_by_kname = get_v_by_kname

Vue.prototype.get_keyname_value = get_keyname_value
Vue.prototype.add_hostname_before_keyname = add_hostname_before_keyname

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif